@model IEnumerable<Coowork.Data.Mapping.CooTaskComment>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th></th>
        <th>
            Body
        </th>
        <th>
            Creator
        </th>
        <th>
            CreateTime
        </th>
        <th>
            TaskId
        </th>
        <th>
            ParentId
        </th>
        <th>
            NeedFeedback
        </th>
        <th>
            Qer
        </th>
        <th>
            deleted
        </th>
        <th>
            CooTask
        </th>
        <th>
            CooTaskComments1
        </th>
        <th>
            CooTaskComment1
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ID }) |
            @Html.ActionLink("Details", "Details", new { id=item.ID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ID })
        </td>
        <td>
			@item.Body
        </td>
        <td>
			@item.Creator
        </td>
        <td>
			@String.Format("{0:g}", item.CreateTime)
        </td>
        <td>
			@item.TaskId
        </td>
        <td>
			@item.ParentId
        </td>
        <td>
			@item.NeedFeedback
        </td>
        <td>
			@item.Qer
        </td>
        <td>
			@item.deleted
        </td>
        <td>
			@Html.DisplayTextFor(_ => item.CooTask).ToString()
        </td>
        <td>
			@(item.CooTaskComments1 == null ? "None" : item.CooTaskComments1.Count.ToString())
        </td>
        <td>
			@Html.DisplayTextFor(_ => item.CooTaskComment1).ToString()
        </td>
    </tr>
}

</table>


